<template>
    <el-container>
        <el-header>用户首页 。。。</el-header>
        <el-container style="height:700px">
            <el-aside width="220px">

                <el-col :span="12">

                    <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
                        style="width:220px">
                        <el-submenu index="1">
                            <template slot="title">
                                <i class="el-icon-location"></i>
                                <span>级联菜单</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="1-1">选项1</el-menu-item>
                            </el-menu-item-group>
                            <el-submenu index="1-4">
                                <template slot="title">选项4</template>
                                <el-menu-item index="1-4-1">选项1</el-menu-item>
                            </el-submenu>
                        </el-submenu>
                        <el-menu-item index="2">
                            <i class="el-icon-menu"></i>
                            <router-link :to="'/router1'" slot="title"><span class="icon-caret-right"></span>路由1
                            </router-link>

                        </el-menu-item>
                        <el-menu-item index="2">
                            <i class="el-icon-menu"></i>
                            <span slot="title">
                                <router-link :to="'/router2'" slot="title"><span class="icon-caret-right"></span>路由2
                                </router-link>
                            </span>
                        </el-menu-item>
                        <el-menu-item index="3" disabled>
                            <i class="el-icon-document"></i>
                            <span slot="title">导航三</span>
                        </el-menu-item>
                    </el-menu>
                </el-col>


            </el-aside>
            <el-container>
                <el-main>
                    <el-container>
                        <el-main>
                            <router-view></router-view>
                        </el-main>
                    </el-container>
                </el-main>
                <el-footer>Footer</el-footer>
            </el-container>
        </el-container>
    </el-container>
</template>
<script>
export default {
    name:"index",
    data() {
        return {

        }
    },
    methods: {
        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        }
    }
}
</script>
<style>

  .el-header, .el-footer {
    background-color: #9fe6af;
    color: rgb(51, 51, 51);
    text-align: center;
    line-height: 100px;
  }


  .el-aside {
    /* background-color: #b8edcc; */
    color: rgb(51, 51, 51);
        text-align: center;
        line-height: 700px;

    }

    .el-main {
        background-color: #b8edcc;
        color: rgb(51, 51, 51);
        text-align: center;
        line-height: 150px;
    }

    body>.el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 700px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 700px;
    }

</style>